<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ page contentType="text/html; charset=UTF-8" %>

<jsp:useBean id="user" class="model.User" scope="session" />
<jsp:useBean id="prevoznik" class="model.Prevoznik" scope="session" />

<html>
<head>
<meta http-equiv="Pragma" content="no-cache">

<title>Izmena podataka prevoznika</title>
</head>
<body>
<h1>Izmena podataka prevoznika</h1>

<%
	if (user != null && user.isLoggedIn()) {
%>
<form action="/profile" method="get">
<table>
	<tr>
		<td align=right>Naziv:</td>
		<td><input type="text" name="naziv" value="${prevoznik.naziv}"></td>		
	</tr>

	<tr>
		<td align=right>Adresa:</td>
		<td><input type="text" name="adresa" value="${prevoznik.adresa}"></td>
	</tr>

	<tr>
		<td align=right>Email:</td>
		<td><input type="text" name="eMail" value="${prevoznik.eMail}"></td>		
	</tr>

	<tr>
		<td align=right>Telefon:</td>
		<td><input type="text" name="telefon" value="${prevoznik.telefon}"></td>
	</tr>

	<tr>
		<td><input type="hidden" name="changed" value="true"></td>
		<td><input type="submit" value="Izmeni"></td>
	</tr>
</table>

</form>
<%
	} else {
%>
<p>Niste se prijavili! <br>
<a href="/logIn">Prijavi se</a></p>
<%
	}
%>

<p><a href="/timeTableServlet">Red voznje</a> <br>
<a href="/logIn?logOff=true">Odjava</a></p>

</body>
</html>
